<!DOCTYPE html>
<html lang="en">
<head>
	<title></title>
	<meta charset="UTF-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap.min.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/bootstrap-responsive.min.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/uniform.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-style2.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/matrix-media.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/font-awesome/css/font-awesome.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<link rel="stylesheet" href="__PUBLIC__/Admin/css/changyun.css?v={#$Think.config.ADMIN_VERSION_VAL}"/>
	<style>
		.table th, .table td {
			line-height: 20px;
			text-align: center;
			border-top: 1px solid #ddd;
			padding: 5px 0 5px 10px;
			vertical-align: middle;
		}
	</style>
</head>
<body>
<div id="content">
	<include file="Public/maintop"/>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="cyz-m-tab">
						<ul class="cyz-m-tab-title">
							<li class="cyz-m-this" href="javascript:void(0);">VIP管理</li>
						</ul>
					</div>
					<div class="widget-content" style="padding:5px;border:0px;">
						<div class="fl table-button">
							<a href="{#:U('addVipSetting')}" class="btn btn-success"><i class="icon-plus"></i> 新增</a>
						</div>
						<div style="clear: both;"></div>
					</div>

					<div class="widget-content" style="padding:5px;">
						<table class="table table-bordered table-striped with-check">
							<thead>
							<tr>
								<th style="width:80px;">ID</th>
								<th class="">激活码</th>
								<th class="">天数</th>
								<th class="">状态</th>
								<th class="">操作</th>
							</tr>
							</thead>
							<tbody>
							<notempty name="list">
								<volist name="list" id="admin">
									<form method="post" action="{#:U('index_edit')}" id="form_i_{#$admin.id}">
										<tr>
											<td>
												{#$admin.id}
											</td>
											<td>
												{#$admin.code}
												<!--												<input type="text" name="code" value="{#$admin.code}"-->
												<!--												<eq name="admin.is_use" value="1">disabled</eq>-->
												<!--												/>-->
											</td>
											<td>
												{#$admin.vip_day}
												<!--												<input type="number" name="vip_day" value="{#$admin.vip_day}"-->
												<!--												<eq name="admin.is_use" value="1">disabled</eq>-->
												<!--												/>-->
											</td>
											<td style="text-align: center">
												<eq name="admin.is_use" value="1">
													<img style="width: 40px;height: 40px;border-radius: 50%;border:1px solid #efefef;" src="{#$admin.user_headimg}"><br/>
													{#$admin.user_nickname}<br/>
													<a class="btn btn-mini btn-danger">已使用</a>
													<else/>
													<a class="btn btn-mini btn-success">可使用</a>
												</eq>
											</td>
											<td style="width:220px;">
												<input type="hidden" name="id" value="{#$admin.id}"/>
												<!--												<button type="submit" class="btn btn-mini btn-warning">-->
												<!--													<i class="icon-refresh"></i> 更新-->
												<!--												</button>-->
												<eq name="admin.is_use" value="0">
													<a title="删除" href="javascript:void(0);" onclick="dodel('{#:U('Appsetting/codeDel?id='.$admin['id'])}')" class="btn btn-mini btn-danger"><i class="icon-remove"></i> 删除</a>
												</eq>
											</td>
										</tr>
									</form>
								</volist>
								<else/>
								<td colspan="9" class="text-center"> 暂时还没有验证码</td>
							</notempty>
							</tbody>
						</table>
						<div id="hongxin_page_view">{#$page_show}</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/jquery.ui.custom.js"></script>
<script src="__JS__/bootstrap.min.js"></script>
<script src="__JS__/jquery.uniform.js"></script>
<script src="__JS__/select2.min.js"></script>
<script src="__JS__/matrix.js"></script>
<script src="__JS__/matrix.tables.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
function dodel(jump_url) {
	layer.confirm('确定要删除吗', {
		title: '提示',
		icon: 0,
		btn: ['确定', '取消'] //按钮
	}, function(e) {
		window.location.href = jump_url;
		layer.close(e);
	}, function(e) {
		layer.close(e);
	});
}

function edit_access(e) {
	layer.open({
		type: 2,
		offset: '100px',
		title: '授权操作',
		area: ['600px', '300px'],
		content: $(e).attr("data_url"),
		success: function(layero, index) {
			//layer.iframeAuto(index);
		}
	});
}
</script>
</body>
</html>
